package uba.ing2.subite.demo;

import org.apache.pivot.util.concurrent.Task;
import org.apache.pivot.util.concurrent.TaskExecutionException;

public class SleepTask extends Task<Void> {
	private int millis;

	public SleepTask(int millis) {
		this.millis = millis;
	}

    @Override
    public Void execute() throws TaskExecutionException {
        try {
            Thread.sleep(millis);
        } catch (InterruptedException exception) {
            throw new TaskExecutionException(exception);
        }
        return null;
    }
}

